<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:decorate template="tema/padrao.xhtml">
        <ui:define name="conteudo">
		<h:form prependId="false" id="formCadCli">
			<p:growl id="growl" sticky="true" showDetail="true" />
			<p:panel header="Cadastro de Cliente" toggleable="true" id="panel">
				<h:panelGrid columns="2" cellpadding="2" style="margin-left:-410px; margin-top:10px;">

					<h:outputLabel for="nome" value="Nome Completo: *" />
					<p:inputText id="nome" value="#{clienteBean.cliente.nome}" required="false" label="Nome Completo" />
					
					<h:outputLabel for="telefone" value="Telefone: *" />
					<p:inputText id="telefone" value="#{clienteBean.cliente.telefone}" required="false"	label="Telefone" />
					
					<h:outputLabel for="endereco" value="Endereço: *" />
					<p:inputText id="endereco" value="#{clienteBean.cliente.endereco}" required="false" label="Endereco" />

					<h:outputLabel for="email" value="Email: *" />
					<p:inputText id="email" value="#{clienteBean.cliente.email}" required="false" label="Email" />

					<h:outputLabel for="funcao" value="Função: *" />
					<p:inputText id="funcao" value="#{clienteBean.cliente.funcao}" required="false" label="Função" />
			
					<h:outputLabel for="codCarteira" value="Codigo Carteira: *" />
					<p:inputText id="codCarteira" value="#{clienteBean.cliente.codCarteira}" required="false" label="Codigo Carteira" />
					<f:facet name="footer">  
						<p:commandButton id="btSalvar" value="Salvar" ajax="true" actionListener="#{clienteBean.salvarCliente()}" icon="ui-icon-check" update=":formCadCli" style="margin:0; margin-top:15px;" />
						<p:commandButton id="btCancelar" value="Cancelar" action="#{clienteBean.cancelar()}" icon="ui-icon-check" style="margin:0; margin-left:10px; margin-top:15px;" />   
				    </f:facet>
				</h:panelGrid>
			</p:panel>
		</h:form>
	</ui:define>
    </ui:decorate>
</html>